<!DOCTYPE html>
<html>

<head>
  <title></title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="../bootstrap-5.1.3-dist/css/bootstrap.css" rel="stylesheet">
  <script src="../bootstrap-5.1.3-dist/js/bootstrap.bundle.min.js"></script>
</head>

<body class="container">
  <h3 align="center">交叉淡入淡出效果</h3>
  <!-- 轮播 -->
  <div id="carousel" class="carousel slide carousel-fade" data-bs-ride="carousel">
    <!-- 指示图标 -->
    <div class="carousel-indicators">
      <button type="button" data-bs-target="#carousel" data-bs-slide-to="0" class="active"></button>
      <button type="button" data-bs-target="#carousel" data-bs-slide-to="1"></button>
      <button type="button" data-bs-target="#carousel" data-bs-slide-to="2"></button>
    </div>
    <!-- 轮播图片和文字 -->
    <div class="carousel-inner">
      <div class="carousel-item active">
        <img src="1.jpg" class="d-block" style="width:100%">
      </div>
      <div class="carousel-item">
        <img src="2.jpg" class="d-block" style="width:100%">
      </div>
      <div class="carousel-item">
        <img src="3.jpg" class="d-block" style="width:100%">
      </div>
    </div>
    <!-- 左右切换按钮 -->
    <button class="carousel-control-prev" type="button" data-bs-target="#carousel" data-bs-slide="prev">
      <span class="carousel-control-prev-icon"></span>
    </button>
    <button class="carousel-control-next" type="button" data-bs-target="#carousel" data-bs-slide="next">
      <span class="carousel-control-next-icon"></span>
    </button>
  </div>



</body>

</html>